package amend;

import com.lijinjiang.beautyeye.BeautyEyeLNFHelper;

import javax.swing.*;
import java.awt.*;

/**
 * @ClassName Amend05_JTable
 * @Description 调整 JTable 的显示样式
 * @Author Li
 * @Date 2022/8/29 19:18
 * @ModifyDate 2022/8/29 19:18
 * @Version 1.0
 */
public class Amend05_JTable {
    public static void main(String[] args) {
        try {
            /**
             * 设置本属性将改变窗口边框样式定义
             * 系统默认样式 : osLookAndFeelDecorated
             * 强立体半透明 : translucencyAppleLike
             * 弱立体半透明 : translucencySmallShadow
             * 普通不透明 : generalNoTranslucencyShadow
             */
            BeautyEyeLNFHelper.frameBorderStyle = BeautyEyeLNFHelper.FrameBorderStyle.generalNoTranslucencyShadow;
            BeautyEyeLNFHelper.launchBeautyEyeLNF();
        } catch (Exception e) {
            e.printStackTrace();
        }
        JFrame frame = new JFrame(); // 初始化窗口
        frame.setTitle("Amend05"); // 设置标题

        JTable table = new JTable(100, 26);
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        JScrollPane scrollPane = new JScrollPane();
        table.setBorder(null);
        scrollPane.setViewportView(table);
        scrollPane.setBorder(null);
        frame.add(scrollPane);

        frame.setSize(new Dimension(800, 600)); // 显示大小
        frame.setLocationRelativeTo(null); // 屏幕居中
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // 设置默认关闭方式
        frame.setVisible(true);

    }
}
